<%@ page language="java" contentType="text/html;charset=UTF-8"
    pageEncoding="UTF-8"%>	
<%
	StringBuffer url = request.getRequestURL();
	if(url.toString().contains("http://www.meileche.com")){
		request.setAttribute("ctx", "http://www.meileche.com");
	}else if(url.toString().contains("http://localhost:8080")){
		request.setAttribute("ctx", request.getContextPath());
	}else if(url.toString().contains("http://admin.meileche.com")){
		request.setAttribute("ctx", "http://www.meileche.com");
	}
%>
<script type="text/javascript">
	var host = window.location.host;
	var ctx = "";
	if(host == "www.meileche.com"){
		ctx = "http://www.meileche.com";
	}else if(host == "localhost:8080"){
		ctx = "http://localhost:8080/meileche";
	}else if(host == "http://admin.meileche.com"){
		ctx = "http://www.meileche.com";
	}
</script>